[Bugfix] - Changes in logic to delete share db #1706
[Bugfix] - Changes in logic to delete share db #1706dlpzx merged 11 commits intodata-dot-all:mainfrom
Conversation
|
Test cases: Onboarded two dataset ( D1, D2 ) with the same common_db. Onboarded a consumption role ( C1 ). Environment has two roles ( Scientist, Engineers ) Scenerio 1:
Scenario 2:
TODO
|
backend/dataall/modules/shares_base/db/share_object_repositories.py
Outdated
Show resolved
Hide resolved
backend/dataall/modules/shares_base/db/share_object_repositories.py
Outdated
Show resolved
Hide resolved
backend/dataall/modules/shares_base/db/share_object_repositories.py
Outdated
Show resolved
Hide resolved
dlpzx
left a comment
There was a problem hiding this comment.
The changes requested in https://github.com/data-dot-all/dataall/pull/1706/files#r1933588925 need to be fixed. I have not completed the full review because those changes might impact the whole implementation
backend/dataall/modules/s3_datasets_shares/db/s3_share_object_repositories.py
Show resolved
Hide resolved
backend/dataall/modules/s3_datasets_shares/db/s3_share_object_repositories.py
Outdated
Show resolved
Hide resolved
...d/dataall/modules/s3_datasets_shares/services/share_processors/glue_table_share_processor.py
Show resolved
Hide resolved
@dlpzx , I have made changes to fix the structure of the code. There are lot of file which have changed when I did |
# Conflicts: # tests/modules/s3_datasets/test_dataset_glossary.py
backend/dataall/modules/shares_base/services/sharing_service.py
Outdated
Show resolved
Hide resolved
...d/dataall/modules/s3_datasets_shares/services/share_processors/glue_table_share_processor.py
Outdated
Show resolved
Hide resolved
dlpzx
left a comment
There was a problem hiding this comment.
Only some imports need to be removed. The rest looks good IMO.
I am testing the ruff changes in a separate PR. There are format changes that require testing
# Conflicts: # backend/dataall/modules/s3_datasets/aws/athena_table_client.py # backend/dataall/modules/s3_datasets_shares/aws/glue_client.py # tests/modules/s3_datasets_shares/tasks/test_s3_access_point_share_manager.py
Thanks @dlpzx , removed unused imports and also synced PR branch with. the main. now the ruff formatting changes should not appear. Also I tested out the code changes in the PR with the same tests cases as mentioned over here - #1706 (comment) |
|
@dlpzx , I ran make lint and also unit test and everythings passed on my end. Acc to me, I think now this PR is also ready to be merged |
backend/dataall/modules/s3_datasets_shares/db/s3_share_object_repositories.py
Show resolved
Hide resolved
dlpzx
left a comment
There was a problem hiding this comment.
Left one minor comment, the rest looks good~
@dlpzx , Updated PR with correction |
### Feature or Bugfix - Bugfix ### Detail In #1706 all the scenarios tested had multiple Datasets sharing a shared-Glue database. The issue is that when there is no common shared Glue database the lock will try to lock an empty list of resources, resulting in timeouts in `backend/dataall/modules/s3_datasets_shares/services/share_processors/glue_table_share_processor.py:248` ### Relates - #1706 ### Security Please answer the questions below briefly where applicable, or write `N/A`. Based on [OWASP 10](https://owasp.org/Top10/en/). - Does this PR introduce or modify any input fields or queries - this includes fetching data from storage outside the application (e.g. a database, an S3 bucket)? - Is the input sanitized? - What precautions are you taking before deserializing the data you consume? - Is injection prevented by parametrizing queries? - Have you ensured no `eval` or similar functions are used? - Does this PR introduce any functionality or component that requires authorization? - How have you ensured it respects the existing AuthN/AuthZ mechanisms? - Are you logging failed auth attempts? - Are you using or adding any cryptographic features? - Do you use a standard proven implementations? - Are the used keys controlled by the customer? Where are they stored? - Are you introducing any new policies/roles/users? - Have you used the least-privilege principle? How? By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
Feature or Bugfix
Detail
Relates
Security
Please answer the questions below briefly where applicable, or write
N/A. Based onOWASP 10.
fetching data from storage outside the application (e.g. a database, an S3 bucket)? N/A
evalor similar functions are used?By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.